﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using APC.Common; //Data Handling - UI Language - Icon Gallery

namespace Common
{
    public class GUILanguage
    {

        #region Public Properties

        public int ID
        {
            set { _ID = value; }
            get { return _ID; }
        }
        private int _ID = 0;
 
        public string Language
        {
           set { _Language = value; }
           get { return _Language; }
        }
        private string _Language = "";

        public DataSystemDataContext DataContext
        {
            set { _DataContext = value; }
            get { return _DataContext; }
        }
        private DataSystemDataContext _DataContext = null;
       

        #endregion


        /// <summary>
        /// Translates UI Language 
        /// </summary>
        /// <returns></returns>
        private String TranslateUI()
        {
            string Lng = "";

            switch (_Language)
            {
                case "en-US":
                    foreach (UILanguage ui in _DataContext.UILanguages.Where(x => x.ID == _ID))
                    {
                        Lng = ui.en_US;
                    }
                    break;

                case "dk-DK":
                    foreach (UILanguage ui in _DataContext.UILanguages.Where(x => x.ID == _ID))
                    {
                        Lng = ui.dk_DK;
                    }
                    break;
                case "ko-KR":
                    foreach (UILanguage ui in _DataContext.UILanguages.Where(x => x.ID == _ID))
                    {
                        Lng = ui.ko_KR;
                    }
                    break;
            }
            return Lng;
        }

    }
}
